home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
archiver
/
unix
/
zip19p1.zoo
/
vms
/
vms_zip.rnh
< prev
next >
Wrap
Text File
|
1992-08-20
|
18KB
|
416 lines
.!
.! File: ZIP.RNH
.!
.! Author: Hunter Goatley
.!
.! Date: October 22, 1991
.!
.! Description:
.!
.! RUNOFF source file for portable ZIP on-line help for VMS.
.! Adapted from ZIP.DOC, distributed with ZIP.
.!
.! To build: $ RUNOFF ZIP.RNH
.! $ LIBR/HELP/INSERT libr ZIP
.!
.! Modification history:
.!
.! Hunter Goatley 22-OCT-1991 20:45
.! Genesis.
.! Jean-loup Gailly 25 March 92
.! Adaptation to zip 1.6.
.! Igor Mandrichenko 9-JUN-1992
.! Added explanation of -V option.
.! Jean-loup Gailly 14 June 92
.! Adaptation to zip 1.8.
.! Jean-loup Gailly 20 Aug 92
.! Adaptation to zip 1.9.
.!
.noflags
.lm4 .rm72
.indent -4
1 ZIP
.br
Zip is a compression and file packaging utility for Unix, MSDOS, OS/2, and
VMS. It is analogous to a combination of tar and compress and is
compatible with PKZIP (Phil Katz ZIP) for MSDOS systems.
.sk
There is a companion to Zip called UnZip (of course). Zip and UnZip can
work with files produced by PKZIP under MSDOS, and PKZIP and PKUNZIP can
work with files produced by Zip.
.sk
Zip 1.9 is compatible with PKZIP 1.93a.
Note that pkunzip 1.10 cannot extract files produced by pkzip 1.93a
or zip 1.9. You must use pkzip 1.93a or unzip 5.0 to extract them.
.sk
For a brief help on Zip and Unzip, run each without specifying any
parameters on the command line.
.sk
Zip puts one or more compressed files into a single "zip file" along with
information about the files, including the name, path if requested, date
and time last modified, protection, and check information to verify the
fidelity of each entry. Zip can pack an entire directory structure in a
zip file with a single command. Compression ratios of 2:1 to 3:1 are
common for text files. Zip has has one compression method (deflation) and
can also store files without compression. It automatically chooses the better
of the two for each file to be compressed.
.sk
Zip is useful for packaging a set of files to send to someone or for
distribution; for archiving or backing up files; and for saving disk space
by temporarily compressing unused files or directories.
.sk
Format:
.sk;.lm+1;.literal
ZIP [-options] [-b path] [-n suffixes] [-t mmddyy] zipfile file(s) [-x list]
.end literal;.lm-1
.!------------------------------------------------------------------------------
.indent -4
2 Options
.br
The default action of Zip is to add or replace zipfile entries from list, which
can include the special name -@ to read names from SYS$INPUT. The following
list of options was taken from the on-line help generated when Zip is run
without any command-line parameters:
.sk
.literal
-f freshen: only changed files
-d delete entries in zipfile
-k simulate PKZIP made zipfile
-h show this help
-r recurse into directories
-q quiet operation
-c add one-line comments
-b use "path" for temp files
-o make zipfile as old as latest entry
-w append the VMS version number to name stored in zip file
-x exclude the names that follow from those operated on
-u update: only changed or new files
-m move into zipfile (delete files)
-g allow growing existing zipfile
-l translate end-of-lines
-j junk (don't record) directory names
-0 store only
-1 compress faster
-9 compress better
-n don't compress theses suffixes
-z add zipfile comment
-t only do files after "mmddyy"
-L show software license
-V save VMS file attributes
.end literal
.!------------------------------------------------------------------------------
.indent -4
2 How_To_Use_Zip
.br
The simplest use of Zip is as follows:
.sk;.indent 10;$ zip stuff *
.sk
This will create the file "STUFF.ZIP" (assuming it does not exist) and put
all the files in the current directory in STUFF.ZIP in a compressed form.
The .ZIP suffix is added automatically, unless that file name given
contains a dot already. This allows specifying suffixes other than ".ZIP".
.sk
To zip up an entire directory, the command:
.sk;.indent 10
$ zip -r foo *.*
.sk
will create the file "FOO.ZIP" containing all the files and directories in
the in the current directory. The "r" option means recurse through the
directory structure.
.sk
You may want to make a zip file that contains the files in [.FOO], but not
record the directory name, FOO. You can use the -j (junk path) option to
leave off the path:
.sk;.indent 10
$ zip -j foo [.foo]*.*
.sk
You might be zipping to save disk space, in which case you could:
.sk;.indent 10
$ zip -rm foo *.txt
.sk
where the "m" option means "move". This will delete all files matching
*.txt after making FOO.ZIP. No deletions will be done until the zip has
completed with no errors. This option is obviously more dangerous and
should be used with care.
.sk
If the zip file already exists, these commands will replace existing or add
new entries to the zip file. For example, if you were really short on disk
space, you might not have enough room simultaneously to hold the directory
[.FOO] and the compressed FOO.ZIP. In this case, you could do it in steps.
If [.FOO] contained the subdirectories [.TOM], [.DICK], and [.HARRY], then
you could:
.sk;
.indent 10;$ zip -rm foo [.foo.tom]
.indent 10;$ zip -rm foo [.foo.dick]
.indent 10;$ zip -rm foo [.foo.harry]
.sk
where the first command would create FOO.ZIP, and the next two would add to
it. At the completion of each zip command, the files in the directory just
zipped would be deleted, making room in which the next Zip command could
work.
.!------------------------------------------------------------------------------
.indent -4
2 Modifying_Existing_Zip_Files
.br
When given the name of an existing zip file with the above commands, Zip
will replace identically named entries in the Zip file or add entries for
new names. For example, if FOO.ZIP exists and contains foo/file1 and
foo/file2, and the directory [.FOO] contains the files foo/file1 and
foo/file3, then:
.sk;.indent 10
$ zip -r foo foo
.sk
will replace foo/file1 in foo.zip and add foo/file3 to FOO.ZIP. After
this, FOO.ZIP contains foo/file1, foo/file2, and foo/file3, with foo/file2
unchanged from before.
.sk
When changing an existing zip file, Zip will write a temporary file with
the new contents, and only replace the old one when the zip has completed
with no errors. You can use
the -b option to specify a different path (usually a different dev- ice) to
put the temporary files in. For example:
.sk;.indent 10
$ zip -b scratch$:[tmp] stuff *
.sk
will put the temporary zip file and the temporary compression files in the
directory "SCRATCH$:[TMP]", copying over STUFF.ZIP in the current directory
when done.
.sk
If you are only adding entries to a zip file, not replacing, and the -g
option is given, then Zip grows (appends to) the file instead of copying
it. The danger of this is that if the operation fails, the original zip
file is corrupted and lost.
.sk
There are two other ways to change or add entries in a zip file that are
restrictions of simple addition or replacement. The first is -u (update)
which will add new entries to the zip file as before but will replace
existing entries only if the modified date of the file is more recent than
the date recorded for that name in the zip file. For example:
.sk;.indent 10
$ zip -u stuff *
.sk
will add any new files in the current directory, and update any changed
files in the zip file STUFF.ZIP. Note that Zip will not try to pack
STUFF.ZIP into itself when you do this. Zip will always exclude the zip
file from the files on which to be operated.
.sk
The second restriction is -f (freshen) which, like update, will only
replace entries with newer files; unlike update, will not add files that
are not already in the zip file. For this option, you may want to simply
freshen all of the files that are in the specified zip file. To do this
you would simply:
.sk;.indent 10
$ zip -f foo
.sk
Note that the -f option with no arguments freshens all the entries in the
zip file. The same is true of -u, and hence "zip -u foo" and "zip -f foo"
both do the same thing.
.sk
This command should be run from the same directory from which the original
zip command was run, since paths stored in zip files are always relative.
.sk
Another